package com.code.common.annotation;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * Created by IntelliJ IDEA.
 *
 * @author: Yan
 * @date: 2023/3/30
 *
 * 接口幂等性注解
 * {@link com.code.common.aop.IdempotentAop}
 */
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Idempotent {

    String key() default "";

    long expireTime() default 3L;

    TimeUnit timeUnit() default TimeUnit.SECONDS;

    String msg() default "请勿重复提交";

    boolean delKey() default false;
}
